import Vue from 'vue';
import VueRouter from 'vue-router';
import { resolve } from 'path';

Vue.use(VueRouter)

export default new VueRouter({
	linkActiveClass:'link-active',
	routes :[
    {path:'/',redirect : '/stage/index/index'},
		{path:'/stage',redirect : '/stage/index/index'},
		{path:'/stage/index',redirect : '/stage/index/index'},
		{path:'/stage/index/index',component : resolve => require(['../pages/index/index.vue'],resolve),meta:{index:0,}},
		{path:'/stage/user/list',component : resolve => require(['../pages/user/list.vue'],resolve),meta:{index:1,title:['用户管理','用户列表']}},
		{path:'/stage/user/info',component : resolve => require(['../pages/user/userInfo.vue'],resolve),meta:{index:1,title:['用户管理','用户信息']}},
		{path:'/stage/team/list',component : resolve => require(['../pages/team/list.vue'],resolve),meta:{index:2,title:['跑团管理','跑团列表']}},
		{path:'/stage/team/list/info',component : resolve => require(['../pages/team/info.vue'],resolve),meta:{index:3,title:['跑团管理','跑团列表','跑团信息']}},
		{path:'/stage/team/cation',component : resolve => require(['../pages/team/cation.vue'],resolve),meta:{index:2,title:['跑团管理','跑团认证']}},
		{path:'/stage/active/list',component : resolve => require(['../pages/active/list.vue'],resolve),meta:{index:2,title:['活动管理','活动列表']}},
		{path:'/stage/active/edit',component : resolve => require(['../pages/active/edit.vue'],resolve),meta:{index:2,title:['活动管理','查看活动']}},
		{path:'/stage/active/needs',component : resolve => require(['../pages/active/needs.vue'],resolve),meta:{index:2,title:['活动管理','活动需求']}},
		{path:'/stage/fade/list',component : resolve => require(['../pages/fade/list.vue'],resolve),},
		{path:'/stage/finance/cash',component : resolve => require(['../pages/finance/cash.vue'],resolve),meta:{index:2,title:['账单管理','体现管理']}},
		{path:'/stage/finance/list',component : resolve => require(['../pages/finance/billList.vue'],resolve),meta:{index:2,title:['账单管理','账单列表']}},
		{path:'/stage/setting/doc',component : resolve => require(['../pages/setting/doc.vue'],resolve),meta:{index:2,title:['系统设置','帮助文档']}},
		{path:'/stage/setting/manage',component : resolve => require(['../pages/setting/manage.vue'],resolve),meta:{index:2,title:['系统设置','管理员设置']}},
		{path:'/stage/setting/pwd',component : resolve => require(['../pages/setting/pwd.vue'],resolve),meta:{index:2,title:['系统设置','修改密码']}},
		{path:'/stage/setting/version',component : resolve => require(['../pages/setting/version.vue'],resolve),meta:{index:2,title:['系统设置','APP版本']}},
		{path:'/manage/error/error',component : resolve => require(['../pages/404/404.vue'],resolve)},
	],
	scrollBehavior (to, from, savedPosition) {
		return { x: 0, y: 0 };
	},
	mode: 'history',
})